package com.basker.pisces.springcloud.rpc;

import com.basker.pisces.spring.SpringApplicationContext;
import com.basker.pisces.springcloud.utils.RequestUtils;

import feign.RequestInterceptor;
import feign.RequestTemplate;

public class ClientRpcContextInterceptor implements RequestInterceptor {

    @Override
    public void apply(RequestTemplate template) {
        String appId = SpringApplicationContext.getInstance().getName();
        RequestUtils.putAppIdToRequest(appId, template);
    }

}
